package com.boco.modules.fdoc.api;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.boco.common.json.BaseJsonVo;
import com.boco.common.utils.JsonUtils;
import com.boco.modules.fdoc.service.CommonService;
import com.wordnik.swagger.annotations.ApiOperation;

@RestController
@RequestMapping(value = "/smsCode", produces = "text/json;charset=UTF-8")
public class SmsCodeApi {

	@Resource
	CommonService commonService;
	
	@RequestMapping(value = "/sendSmsCode", method = RequestMethod.GET)
	@ApiOperation(value = "发送手机验证码", notes = "{'mobile':'手机号','busiType':'业务类型'}", response = BaseJsonVo.class)
	public String sendSmsCode(@RequestParam String mobile,@RequestParam String busiType){
		
		return JsonUtils.getJson(commonService.sendPhoneCode(mobile));
	
	}
}
